home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / vis082s.arc / MAJIC.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-17  |  2KB  |  70 lines

  1. program majic;
  2.  
  3. uses dos,crt,gentypes,gensubs;
  4.  
  5. var u:userrec;
  6.     f:file of userrec;
  7.     udrat,udkrat,pcrat,i:integer;
  8.     s:string;
  9. begin
  10. clrscr;
  11. textcolor(15);
  12. writeln('Majic Wonders by The ViSiON Team');
  13. textcolor(7);
  14. writeln;
  15. writeln('This program will go through your user log and set each users');
  16. writeln('Upload/Download Ratios, PCR Ratios, and U/D K ratios to what you');
  17. writeln('Want, but FIRST, we need to ask a few questions... So lets begin:');
  18. writeln;
  19. write('What Upload/Download Ratio do you want:');
  20. readln(s);
  21. if s='' then s:='0';
  22. udrat:=valu(s);
  23. write('What Upload/Download K Ratio do you want:');
  24. readln(s);
  25. if s='' then s:='0';
  26. udkrat:=valu(s);
  27. write('What PCR Do you want:');
  28. readln(s);
  29. if s='' then s:='0';
  30. pcrat:=valu(s);
  31. clrscr;
  32. writeln('Ok, this is what we have:');
  33. textcolor(15);
  34. writeln;
  35. write('Upload/Download Ratio        :');
  36. textcolor(14);writeln(udrat);
  37. textcolor(15);
  38. write('Upload/Download K Ratio      :');
  39. textcolor(14);writeln(udkrat);
  40. textcolor(15);
  41. write('Post/Call Ratio              :');
  42. textcolor(14);
  43. writeln(pcrat);
  44. writeln;
  45. textcolor(7);
  46. write('Press [Return]: to continue:');
  47. readln;
  48. clrscr;
  49. writeln('Processing....');
  50. assign(f,'USERS');
  51. i:=0;
  52. reset(f);
  53. while not eof(f) do begin
  54.   seek(f,i);
  55.   read(f,u);
  56.   u.udratio:=udrat;
  57.   u.udkratio:=udkrat;
  58.   u.pcratio:=pcrat;
  59.   textcolor(11);
  60.   writeln(u.handle);
  61.   seek(f,i);
  62.   write(f,u);
  63.   inc(i);
  64.   end;
  65. close(f);
  66. textcolor(15);
  67. writeln;
  68. writeln(i,' users converted!');
  69. end.
  70.